<?php

declare(strict_types=1);

namespace app\yperp\command;

use app\yperp\logic\ypapp\CheckGoods;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\Db;

class checkpyprice extends Command
{

    protected $output;

    protected $input;
    protected $driver;
    protected $windows = [];
    protected $cookies = [];
    protected function configure()
    {
        // 指令配置
        $this->setName('checkpyprice')->setDescription('获取有品商城价格到卖价');
    }

    protected function execute(Input $input, Output $output)
    {
        // 指令输出
        $this->input = $input;

        $this->output = $output;

        // Tools::ypapp();

        foreach ($this->goods as $key => $value) {
            # code...
            dump($value);
            $data = CheckGoods::getInstance()->queryGoodsInfoById($value[0]);
            if ($data) {
                $datas =   ['sell_market_price' => $data['marketPrice'], 'sell_daily_price' => $data['sellPrice']];
                // if ($data['sellPrice'] == null) {
                //     $datas =   ['sell_market_price' => $data['marketPrice'], 'sell_daily_price' => $data['sellPrice']];
                // }
                $res =    Db::name('yperp_supplier')->where('goods_sku_alias', $data['goodsCode'])->update($datas);
                dump($res);
                dump($data);
            }
        }
    }
    public $goods = [
        
        ["S00345347", "立白大师香氛天然洗衣液|1kg*1袋"],
        ["S00345374", "立白大师香氛香水型持久留香洗衣液|香氛液1kg*1瓶+1kg1袋"],
        ["S00345375", "立白大师香氛天然洗衣液|1kg*1瓶+1kg*2袋装"],
        ["S00345818", "舒可乐420张抽纸大包餐巾纸家用卫生纸批发母婴纸抽|18包【实惠装】"],
        ["S00345819", "立白大师香氛洗衣液+内衣专用除菌皂|1kg*1袋+1块"],
        ["S00345820", "立白大师香氛洗衣液|立白大师洗衣液【2瓶+2袋】"],
        ["S00345821", "馋小赖麻辣荤素零食大礼包|110包荤素礼包"],
        ["S00345822", "佳燕 80抽大包装加厚婴儿湿巾宝宝手口专用湿纸巾|140*180mm * 2包"],
        ["S00345823", "幸运女神国潮风一次性纯棉洗脸巾干湿两用|【20*20CM】加厚50抽 * 2包"],
        ["S00345824", "佳燕佳丽洁面巾一次性孕婴儿干湿两用卸妆洁面巾 * 2包"],
        ["S00345863", "吃欢天蟹黄拌面桶装宿舍野餐早餐|吃欢天蟹黄拌面77g *12杯"],
        ["S00345874", "鲜在香辣香脆火腿肠热狗香肠|40支经济装（划算）推荐"],
        ["S00345887", "壹得利 海苔肉松吐司乳酪夹心面包|海苔肉松吐司-16包"],
        ["S00345892", "秋梨枇杷果冻 清甜多汁清润爽口|秋梨枇杷果冻760g * 2罐"],
        ["S00346761", "汉世刘家 垃圾袋家用抽绳手提式加厚实惠装45*40cm|【1卷60只体验装】黑色"],
        ["S00346762", "刻凡 红豆沙青团 200g|【袋装4枚】"],
        ["S00346763", "洁柔纸巾 家用立体压花擦手纸抽纸3层100抽|3包"],
        ["S00346764", "致佳成人款室内运动负重轴承无绳跳绳器|太空黑"],
        ["S00346766", "汽车四季通用去污玻璃水强效去油膜|【0℃升级型1.3L】2瓶"],
        ["S00346767", "致佳 八字拉力器家用开肩美背瘦背健身|绿色"],
        ["S00346768", "汉世刘家 垃圾袋家用抽绳手提式加厚实惠装45*40cm|【5卷100只】金银色"],
        ["S00346769", "立白APG薄荷洗洁精|1.3kg*2瓶"],
        ["S00346808", "立白卫仕洁净除菌去污洗衣液|100g*3袋"],
        ["S00346809", "立白大师香氛洗衣粉|35g*6袋"],
        ["S00346815", "立白女士专用薰衣香除菌抑菌除螨内衣皂|101g（2块装）"],
        ["S00346816", "家用食品级密封保鲜袋|【双筋】20个袋装大"],
        ["S00346827", "乐唯诗 家用高颜值简约牛奶玻璃杯|浮雕把杯【430ml*1】"],
        ["S00346830", "乐唯诗 家用高颜值简约牛奶玻璃杯|竖纹杯【220ML*1】"],
        ["S00346831", "乐唯诗 家用高颜值简约牛奶玻璃杯|扭纹杯【琥珀色*1】"],
        ["S00346840", "【真好意】网红锅巴薯片牛角酥零食|三种口味混合【火锅牛角酥】"],
        ["S00346841", "【真好意】网红锅巴薯片牛角酥零食|烤肉味【火锅牛角酥】"],
        ["S00346842", "【真好意】网红锅巴薯片牛角酥零食|番茄味【火锅牛角酥】"],
        ["S00346847", "【真好意】网红锅巴薯片牛角酥零食|香辣味【火锅牛角酥】"],
        ["S00346998", "芋相莲 无蔗糖绿豆紫薯南瓜 粗粮|绿豆+南瓜+紫薯-6个混合装"],
        ["S00346999", "五黑桑葚黑芝麻黑枸杞紫米饼|五黑桑葚紫米饼-5个装"],
        ["S00347018", "家用挂衣防滑晾衣架|樱花粉【防滑不鼓包】"],
        ["S00347019", "清风BR43NCE3抽纸|4包一提"],
        ["S00347260", "立白大师香氛天然洗衣液|1kg*2袋"],
        ["S00347261", "立白大师香氛天然洗衣液|1kg*3袋"],
        ["S00347262", "立白内衣专护除菌洗衣液|250g*1瓶"],
        ["S00347263", "立白精品青提茉莉洗洁精|488g*2瓶"],
        ["S00347265", "立白miss蜜丝内衣专护洗衣液|480g*1瓶"],
        ["S00347266", "立白石榴精华浓缩果醋洗洁精|500g*1瓶"],
        ["S00347267", "立白石榴精华浓缩果醋洗洁精|1kg*1瓶"],
        ["S00347268", "立白miss蜜丝丁香植萃内衣清洗液|480g*1瓶"],
        ["S00347269", "立白御品海洋精华洗衣液|1000g*2瓶"],
        ["S00347270", "立白精品青提茉莉洗洁精|488g*1瓶"],
        ["S00347272", "立白全自动浓缩洗衣粉|1.3kg两袋"],
        ["S00347273", "立白内衣专护除菌洗衣液|250g*2瓶"],
        ["S00347274", "立白御品海洋精华洗衣液|1000g*1瓶"],
        ["S00347293", "立白好爸爸高端樱花洗衣液|2.8kg一瓶"],
        ["S00347294", "立白好爸爸天然植物基亲肤洗衣露|220g两瓶"],
        ["S00347298", "立白好爸爸高端亲肤樱花洗衣皂粉|2008g*一袋"],
        ["S00347300", "立白好爸爸高端亲肤樱花洗衣皂粉|1308g*两袋"],
        ["S00347301", "立白好爸爸0添加食品用果蔬餐具净洗洁精|1kg*2瓶"],
        ["S00347639", "云南特产高山百香果一级果|5斤"],
        ["S00347640", "云南特产郁金香小香瓜-大果|5斤"],
        ["S00348140", "戚小贝 广西特产真空装肉粽子绿豆五花肉粽|250g*4条"],
        ["S00348141", "戚小贝 广西特产真空装凉粽子原味灰水粽|200g*4条"],
        ["S00348142", "戚小贝 广西特产真空装甜凉粽子Q弹甜味粽|100g*6个"],
        ["S00348143", "鹿辰福建特产20天短保无蔗糖全麦龙井茶酥|10个装【约450g】"],
        ["S00348373", "清风超质感纸巾抽纸3层110抽【1提3包】*2"],
        ["S00348374", "清风小包随身装手帕纸3层10包 *3条装"],
        ["S00348375", "塔菲克 手机tpye-c数据线1.5m*1条装"],
        ["S00348376", "塔菲克 双typec头PD60W快充数据线|1.5m*1条装"],
        ["S00348377", "塔菲克【追剧神器】通用折叠升降手机支架|【经典黑】"],
        ["S00348378", "塔菲克【追剧神器】通用折叠升降手机支架|【象牙白】"],
        ["S00348387", "塔菲克数据线三合一|1米【一拖三】1条装"],
        ["S00348388", "立白植物洗衣皂|232g*两块装"],
        ["S00348390", "立白全效馨香洗衣液|900g一袋"],
        ["S00348391", "塔菲克苹果iPhone iPad 通用数据线|1.5米*1条装"],
        ["S00348392", "立白大师香氛洗衣皂|360g【1包】"],
        ["S00348393", "鹿辰福建特产20天短保无蔗糖黄金南瓜饼|10个装【约500g】"],
        ["S00348406", "立白茶籽洗洁精|1kg*1瓶"],
        ["S00348425", "健美创研 双头棉签|【清洁款500支】圆头+螺旋头"],
        ["S00348426", "健美创研 双头棉签|【化妆款500支】圆头+尖头"],
        ["S00348427", "健美创研 双头棉签|【常规款500支】双头圆"],
        ["S00348428", "健美创研 加厚珍珠纹洁面巾|100抽*一盒"],
        ["S00348434", "洁又佳 抽绳式彩色加厚垃圾袋45*50|10卷150只"],
        ["S00348469", "百屹家居太阳花杯茶杯水杯|【4只装】"],
        ["S00348470", "百屹家居光面啤酒杯茶杯水杯|【4只装】"],
        ["S00348471", "顺艺 无痕护肩浸塑衣架浅咖 40.5cm护肩款|10个装"]
    ];
}
